package com.hl.wuyeguanliIDEA.service.impl;

import com.hl.wuyeguanliIDEA.mapper.EventReminderMapper;
import com.hl.wuyeguanliIDEA.pojo.EventReminder;
import com.hl.wuyeguanliIDEA.service.EventReminderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;
import java.util.Collections;
import java.util.List;
@Service
public class EventReminderServiceImpl implements EventReminderService {
    @Autowired
    private EventReminderMapper eventReminderMapper;

    @Override
    public List<EventReminder> selectByPrimaryKey() {

        return eventReminderMapper.selectByPrimaryKey();
    }

    @Override
    public List<EventReminder> selectAll() {

        return eventReminderMapper.selectAll();
    }

    @Override
    public Optional<EventReminder> selectByPrimaryKey(Long id) {
        return Optional.ofNullable(eventReminderMapper.selectByPrimaryKey(id));
    }

    @Override
    public int add(EventReminder record) {
        return eventReminderMapper.add(record);
    }

    @Override
    public int update(EventReminder record) {
        return eventReminderMapper.update(record);
    }

    @Override
    public int delete(Long id) {
        return eventReminderMapper.delete(id);
    }
}

